summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-12-31 21:00:01 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-12-31 21:00:01 +0100
commitd07397931a167004ea191ef275d11b8a02aa4fb7 (patch)
tree280950f6f82957d507594190ecec3edc561d885a
parentMerge pull request #12479 from GPUCode/linear-bcn (diff)
downloadyuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar.gz
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar.bz2
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar.lz
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar.xz
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.tar.zst
yuzu-d07397931a167004ea191ef275d11b8a02aa4fb7.zip
-rw-r--r--src/core/memory.h2
-rw-r--r--src/video_core/engines/maxwell_dma.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index c1879e78f..7bf05e177 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -683,7 +683,7 @@ public:
} else {
this->m_memory.WriteBlockUnsafe(this->m_addr, this->data(), this->size_bytes());
}
- } else if constexpr (FLAGS & GuestMemoryFlags::Safe) {
+ } else if constexpr ((FLAGS & GuestMemoryFlags::Safe) || (FLAGS & GuestMemoryFlags::Cached)) {
this->m_memory.InvalidateRegion(this->m_addr, this->size_bytes());
}
}
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index 422d4d859..56fbff306 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -228,7 +228,7 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
memory_manager, src_operand.address, src_size, &read_buffer);
- Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
+ Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
tmp_write_buffer(memory_manager, dst_operand.address, dst_size, &write_buffer);
UnswizzleSubrect(tmp_write_buffer, tmp_read_buffer, bytes_per_pixel, width, height, depth,
@@ -292,7 +292,7 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
GPUVAddr dst_addr = regs.offset_out;
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
memory_manager, src_addr, src_size, &read_buffer);
- Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
+ Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
tmp_write_buffer(memory_manager, dst_addr, dst_size, &write_buffer);
// If the input is linear and the output is tiled, swizzle the input and copy it over.